package top.swimmer.provider.test.proxy;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import top.swimmer.provider.proxy.PinyinWordProxy;

import javax.annotation.Resource;

/**
 * Created by youshipeng on 2016/8/3.
 */
@ContextConfiguration(locations={"classpath:META-INF/spring/applicationContext-zmc-knowledge.xml",
        "classpath:META-INF/spring/applicationContext-zmc-elasticsearch.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
public class T_HotspotKnowledgeProxy {

    @Resource(name = "pinyinWordProxy")
    private PinyinWordProxy pinyinWordProxy;

    @Test
    public void testSearch() throws Exception {
        String json = pinyinWordProxy.analyzeSearch("shoujih");
        Assert.assertNotNull(json);
    }
}
